<template>


  <el-tooltip v-if="disabled" :content="tip" placement="bottom-start">
    <el-button type="info">{{label}}</el-button>
  </el-tooltip>
  <el-button v-else :type="type" @click="_click">{{label}}</el-button>
</template>

<script>
export default {
  name: 'BatchButton',
  props: {
    disabled: {
      type: Boolean,
      default: false
    },
    tip: {
      type: String,
      default: "请在下方表格选择要操作的数据，并点击表格右上方按钮进行操作"
    },
    label: {
      type: String,
      default: "按钮"
    },
    type: {
      type: String,
      default: ""
    },
  },
  methods: {
    toggleClick() {
      this.$emit('toggleClick')
    },
    _click() {
      this.$emit('click')
    }
  }
}
</script>

<style scoped>
.hamburger {
  display: inline-block;
  vertical-align: middle;
  width: 20px;
  height: 20px;
}

.hamburger.is-active {
  transform: rotate(180deg);
}
</style>
